package Class.Advance.MethodReference.ReferStructureMethod;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class Example {
    public static void main(String[] args) {
        List<String> studentList = new ArrayList<String>();
        Collections.addAll(studentList, "Jack-10", "Alic-25", "Nick-40", "Black-90");
        List<Student> students = studentList.stream()
                .map(Student::new)
                .toList();
        students.forEach(System.out::println);
    }
}
